<?php /* Smarty version 2.6.6, created on 2013-10-22 14:09:03
         compiled from myplaylist.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'count', 'myplaylist.tpl', 44, false),array('modifier', 'stripslashes', 'myplaylist.tpl', 51, false),)), $this); ?>
<div id="main_wrap">
	<div class="center_wrap clearfix">
        <h2 class="no_bottom no_top breadcrumb">
        	<a>My Playlists</a>
        </h2>
		<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "accountmenu.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?> 
		<div class="right col1">
            <div class="cat_box_full clearfix" id="browse_main"> 
            					<table width="100%" cellspacing="3" cellpadding="3" border="0">
					<tr>
						<td valign="top">
							<h2>My playlists</h2>
						</td>
                    </tr>
					<tr>
						<td valign="top">
							<a href="<?php echo $this->_tpl_vars['baseurl']; ?>
/create_playlist.php">Create new playlist</a>
						</td>
					</tr>
					<?php if ($this->_tpl_vars['deleteMsg'] != ""): ?>
						<tr>
							<td>
								<div id="smsg" class="errorPage clearfix" style="">
									<h2 style="font-size:18px"><?php echo $this->_tpl_vars['deleteMsg']; ?>
</h2>
								</div>
							</td>
						</tr>
					<?php endif; ?>	
				</table>	
                <div class="cat_body_full clearfix">
                <?php if ($this->_tpl_vars['error'] != ""): ?>
                <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "show_error.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
                <?php endif; ?>
                <?php if ($this->_tpl_vars['message'] != ""): ?>
                <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "show_message.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
                <?php endif; ?>
                  
                  <!-- LOOP START -->
				  <div id="browse_results">
				  <?php if (count($this->_tpl_vars['listplaylists']) > 0): ?>
				  <form id="deleteform" name="deleteform" action="<?php echo $this->_tpl_vars['action']; ?>
" method="post" onsubmit="return chkPlaylist();" >
				  <ul>
				  	<?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['listplaylists']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
							<li class="video">
								<div class="video_i">
									<a href="<?php echo $this->_tpl_vars['baseurl']; ?>
/view_playlist.php?ID=<?php echo $this->_tpl_vars['listplaylists'][$this->_sections['i']['index']]['PLAYLISTID']; ?>
">
										<img class="imag" height="87" width="116" alt="<?php echo ((is_array($_tmp=$this->_tpl_vars['listaudios'][$this->_sections['i']['index']]['playlist_title'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
" src="<?php echo $this->_tpl_vars['baseurl']; ?>
/images/tjj_music_dj_headset.png" />
										<div class="tag"></div>
									</a>
									<a href="<?php echo $this->_tpl_vars['baseurl']; ?>
/view_playlist?ID=<?php echo $this->_tpl_vars['listplaylists'][$this->_sections['i']['index']]['PLAYLISTID']; ?>
">
										<span class="artist_name"><?php echo ((is_array($_tmp=$this->_tpl_vars['listplaylists'][$this->_sections['i']['index']]['playlist_title'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
</span>
									</a>
									<p>Delete playlist <input type="checkbox" name="deleteplaylist[]" value="<?php echo $this->_tpl_vars['listplaylists'][$this->_sections['i']['index']]['PLAYLISTID']; ?>
"></p>
									
								</div>
							</il>
						<?php endfor; endif; ?>	
					</ul>
                    
				  <div class="clear"></div>
                  <input type="submit" name="submitdelete" value="<?php echo $this->_tpl_vars['lang485']; ?>
" />
				  <?php endif; ?>
				  </form>
				  </div>
                  <!-- LOOP END -->
    
                </div>

                <div class="paginate">
                	<?php echo $this->_tpl_vars['pagelinks']; ?>

                                    </div>
  			</div>
		</div>
    	<div class="clear"></div>
	</div>
</div>
<?php echo '
<script type="text/javascript">
var $j = jQuery.noConflict();
	function chkPlaylist(){
	
		var atLeastOneIsChecked = jQuery(\'input[name="deleteplaylist[]"]:checked\').length;
		if(atLeastOneIsChecked<=0){
			alert("Please select atleast one playlist to delete.");
			return false;
		}
		else 
			return true;
	}
</script>
'; ?>